Fix POSIX shell in configure script (support Illumos & Solaris)
This patch provides the same fix that is applied for the `configure` script in rustc:
https://github.com/rust-lang/rust/blob/master/configure#L3-L9. It is required because `#!/bin/sh` is not Bash/POSIX-compatible on Solaris and its derivatives by default.
This change was previously discussed there: https://github.com/rust-lang/rust/pull/28589.